<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<h:form id="faultCountForm">
		
		<div id="headDiv" class="box box-solid with-border">
			<div class="box-header" id="queryDiv">
				<p:outputLabel value="当前年份:" />
				<input type="text" id="year" onchange="chaneYear()" style="text-align: center; height: 30px; width:80px;margin-left: 5px" />
				<p:remoteCommand name="changeYear" update="monthDetailTable" actionListener="#{deviceFaultCountController.changeYear}" />
			</div>
		</div>
		<p:dataTable id="monthDetailTable" var="info"
			value="#{deviceFaultCountController.countList}"
			emptyMessage="无记录" style="text-align:center" rows="12"
			paginator="true" paginatorPosition="bottom"
			paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			rowsPerPageTemplate="12,20,50">
			<p:columnGroup type="header">
				<p:row>
					<p:column width="120" rowspan="3" headerText="统计日期" />
					<p:column colspan="6" headerText="保护上送情况" />
					<p:column colspan="3" rowspan="2" headerText="集中录波上送情况" />
				</p:row>
				<p:row>
					<p:column colspan="3" headerText="报文" />
					<p:column colspan="3" headerText="录波" />
				</p:row>
				<p:row>
					<p:column headerText="完整次数" />
					<p:column headerText="不完整次数" />
					<p:column headerText="完整率" />
					<p:column headerText="完整次数" />
					<p:column headerText="不完整次数" />
					<p:column headerText="完整率" />
					<p:column headerText="完整次数" />
					<p:column headerText="不完整次数" />
					<p:column headerText="完整率" />
				</p:row>
			</p:columnGroup>
			<p:column>
				<p:outputLabel value="#{info.year}年#{info.month}月" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:#1E90FF" value="#{info.actionDatagramCompleteCount}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:#1E90FF" value="#{info.actionDatagramIncompleteCount}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:#1E90FF"
					value="#{deviceFaultCountController.getRate(info.actionDatagramCompleteCount,info.actionDatagramIncompleteCount)}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:#FF7F50" value="#{info.actionWaveCompleteCount}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:#FF7F50" value="#{info.actionWaveIncompleteCount}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:#FF7F50"
					value="#{deviceFaultCountController.getRate(info.actionWaveCompleteCount,info.actionWaveIncompleteCount)}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:green" value="#{info.waveCompleteCount}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:green" value="#{info.waveIncompleteCount}" />
			</p:column>
			<p:column>
				<p:outputLabel style="color:green"
					value="#{deviceFaultCountController.getRate(info.waveCompleteCount,info.waveIncompleteCount)}" />
			</p:column>
		</p:dataTable>
	</h:form>
</ui:composition>
